package gizwits.kit;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Robo on 2017/10/26.
 */
public class HashMapKit {
    public enum DeviceStatus {
        DEVICE_STATUS_NORMAL(0,"正常"),
        DEVICE_STATUS_ALERT(1,"报警"),
        DEVICE_STATUS_FAULT(2,"故障"),
        DEVICE_STATUS_OFFLINE(3,"离线");
        private Integer name;
        private String value;
        DeviceStatus(Integer name, String value) {
            this.name = name;
            this.value = value;
        }

    }
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put(1, "2");
        System.out.println(map.get(1));
        System.out.println(map.get(2));
        System.out.println(DeviceStatus.valueOf("DEVICE_STATUS_NORMAL").name+"|"+DeviceStatus.valueOf("DEVICE_STATUS_NORMAL").value);

    }
}
